package com.amsp.oa.oademo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 申购单明细表实体类
 */
@Data
@TableName("purchase_request_item")
@ApiModel(value = "申购单明细表", description = "申购单明细表信息")
public class PurchaseRequestItem {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "申购单ID")
    private Long requestId;

    @ApiModelProperty(value = "品名/规格")
    private String productName;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "申购数量")
    private BigDecimal requestedQuantity;

    @ApiModelProperty(value = "批准数量")
    private BigDecimal approvedQuantity;

    @ApiModelProperty(value = "需用日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate neededDate;

    @ApiModelProperty(value = "回复日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate replyDate;

    @ApiModelProperty(value = "用途及说明")
    private String purpose;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否删除(0-未删除，1-已删除)")
    @TableLogic
    private Integer isDeleted;
}